#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void cheng(n)
{
	for (int a = 1; a <= n; a++)
	{
		for (int b = 1; b <= n; b++)
		{
			int m = a * b;
			printf(" % d * %d = % d  ", a, b, m);
		}
		printf("\n");
	}
}

int main()
{
	int i;
	scanf("%d", &i);
	cheng(i);
	return 0;
}